<?php

include_once dirname(__FILE__) . "/log.php";

class Conf {
        
    public static function get($entry)
    {
        global $err_code;

        $conf = parse_ini_file(dirname(__FILE__) . "/conf/conf.ini");
        if( $conf == false || !is_array($conf) )
        {
            $err_code = ec_conf_error;
            Log::error("load conf file error");
            return false;
        }

        if( !array_key_exists($entry, $conf) )
        {
            $err_code = ec_conf_error;
            Log::error("entry[$entry] not found in conf file");
            return false;
        } 

        return $conf[$entry];
    }
};

?>
